package org.example.coupon.controller.front;

import org.example.core.utils.R;
import org.example.coupon.entity.SeckillPromotionEntity;
import org.example.coupon.service.SeckillPromotionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/sms/front/sPromotion")
public class PromotionFrontController {

    @Autowired
    private SeckillPromotionService seckillPromotionService;

    @GetMapping("/list")
    public R<?> list(){
        List<SeckillPromotionEntity> entities = seckillPromotionService.getPromotionList();
        return R.ok(entities);
    }
}
